#pragma once 
#include <iostream>
#include <time.h>

std::string GetCurrTime()
{
    time_t t = time(nullptr);
    struct tm *cur = ::localtime(&t);
    char buffer[64];
    snprintf(buffer,sizeof(buffer),"%d-%d-%d %d:%d:%d",
    cur->tm_year+1900,
    cur->tm_mon+1,
    cur->tm_mday,
    cur->tm_hour,
    cur->tm_min,
    cur->tm_sec);
    return buffer;
}